import { RouteRecordRaw } from "vue-router";
import MtmSon from "./MtmSon/index";
import {copyObj} from "@/utils/util"
const sonRouter =  copyObj(MtmSon,(obj:any)=>{
    if(obj.path)  obj.path = '/supplier'+obj.path
    return obj;
});


// 首页模块
const router: Array<RouteRecordRaw> = [
    {
        path: "/supplier/mtm",
        name: "supplierMtm",
        redirect: "/supplier/mtm/index",
        component: () => import("@/layout/supplierIndex.vue"),
        meta: {
            title: "首页",
        },
        children: [
            ...sonRouter,
            {
                path: "/supplier/mtm/index/group",
                component: () => import("@/views/Mtm/Make/index.vue"),
                meta: {
                    title: "团单定制",
                }
            }
        ]
    },

];

export default router;